<#--文件名-->
<#assign TargetEntityName = "${entity?substring(0,entity?length-cfg.EntitySuffix?length)}">
<#assign TargetEntityNameSuffix = "${cfg.ConvertSuffix}">
<#--相关变量-->
<#assign TargetFileName = "${TargetEntityName}${TargetEntityNameSuffix}">
<#assign TargetDTOName = "${TargetEntityName}${cfg.DtoSuffix}">
<#assign TargetBOName = "${TargetEntityName}${cfg.BoSuffix}">
<#--包名-->
<#assign TargetPackageName = "${cfg.ConvertPackageName}">
<#--代码区-->
package ${cfg.ModulePackage}.${TargetPackageName};

import ${package.Entity}.${entity};
import ${cfg.ModulePackage}.${cfg.BoPackageName}.${TargetBOName};
import ${cfg.ModulePackage}.${cfg.DtoPackageName}.${TargetDTOName};

import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 *  ${TargetEntityName}转换器
 *
 * @author ${author}
 * @since ${date}
 */
@Mapper
public interface ${TargetFileName} {

    ${TargetFileName} INSTANCE=Mappers.getMapper(${TargetFileName}.class);

    /**
     * DTO转DO
     * @param dto dto对象
     * @return do对象
     */
    @Mappings({})
    ${entity} dto2do(${TargetDTOName} dto);

    @Mappings({})
    List<${entity}> dto2do(List<${TargetDTOName}> dtoList);

    /**
     * DO转BO
     * @param dataObject do对象
     * @return bo对象
     */
    @Mappings({})
    ${TargetBOName} do2bo(${entity} dataObject);

    @Mappings({})
    List<${TargetBOName}> do2bo(List<${entity}> doList);

}
